Importing your Project into CVS

There are three possibilities to get your sources into the CVS repository:

- Migrating from RCS (or other VCS systems). You can do this without losing any information: see Migrating from other VCS tools to CVS
- Using CVS import for third-party source tracking or fast import of large source trees. See the Command Reference on how to accomplish this. If you already have your project in CVS, please proceed with Initial Checkout of non SNiFF+-Controlled Projects
- Using SNiFF+ File Commands for initial check-in. This works exactly the same way as known from RCS.

The third option above is the simplest one, therefore we describe it in detail in terms of the complex example here:

Copy the complex sources from the SNiFF+ distribution into the Shared Source or Private Working Environment you created in step 4 Setting up the Repository for SNiFF+
On Winodws, you can use the Explorer; on Unix, you can type

cd <your CVS Import Working Environment>
cp -R $SNIFF_DIR/example/c++/complex_dir/user/complex.
In the Working Environments Tool, select your SSWE or PWE and choose File > New Project... > with Defaults.... In the Directory Name Dialog, select your main project directory (i.e. complex).
In the Attributes of New Project Dialog, choose the General node and make sure that the Create Subproject Tree checkbox is activated.
Select the Version Control System Node and select CVS from VCS Tool.
Choose OK to create the project. The Project Editor opens. You should see the three CVS custom menus.
Select any file to enable the custom menus.

| Note
| For most CVS commands in the custom menus (including the module related commands), it is necessary to select a file first. SNiFF+ will use the name of the SNiFF+ project to which the file belongs as its CVS module name.

- If you don't have a CVS Repository yet, select first CVS Admin > Init CVS Repository. This will perform a
cvs init command to create initial CVS administrative files in the Repository.
Select CVS Admin > Add SNiFF+ cvsignore entries. This will add the SNiFF+ specific file patterns like .sniffdir to the CVS ignore list, which is necessary to allow correct import of projects (otherwise the SNiFF+ temporary files would also be version controlled after an import command).
Choose CVS Admin > Show cvsignore file to verify that the entries have been correctly added to the repository.
Select all your files and choose File > Check In.... A dialog box with the standard SNiFF+ parameters for Check In appears. For initial Check In, you can leave these empty.

| Note
| As you check in your sources, with every directory that was unknown before, there will appear a dialog box asking for the repository directory where you want to put your sources. In most cases, you can leave the guess by SNiFF+ as it is; however, if you want to put your sources in a different remote path than the local one, you may change the directory location.

Watch the messages CVS produces in your shell. Now, your sources are in the CVS repository. If you only want to use the File related CVS commands, you are done; only if you want to use

cvs rtag and other purely module related commands, you need to define CVS modules.